<template>
  <div class="admin-container">
    <div v-if="title != null" class="page-header">
      <el-page-header @back="goBack" :content="title"></el-page-header>
    </div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: null,
    }
  },
  methods: {
    goBack() {
      this.$router.back();
    }
  }
}
</script>

<style scoped>
.admin-container {
  background: #fff;
  border-radius: 4px;
  padding: 18px;
  border: 1px solid #DCDFE6;
  margin-bottom: 5px;
}
</style>